This markdown file describes the creation of an interactive scatter plot created with plotly that does some exploratory data analsysis on whether there is a correspondance between global position and number of active volcanos. The results suggest that active Volcanos are more common in the northern hemisphere (above the equator at lattitude = 0).
#create volcano data frame using volcano data from http://volcano.oregonstate.edu/volcano_table
volcanos<-read.csv("volcanos.csv")
#load plotly library
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
#make graph
plot_ly(y=volcanos$Lat,x=volcanos$Long,hoverinfo='text', text=volcanos$Name)%>%layout(title = 'Lattitude and Longitude of Active Volcanos',
yaxis = list(title = 'Lattitude'),xaxis = list(title = 'Longitude'))
## No trace type specified:
## Based on info supplied, a 'scatter' trace seems appropriate.
## Read more about this trace type -> https://plot.ly/r/reference/#scatter
## No scatter mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode
## Warning: Ignoring 6 observations